package com.zb.entity.dto;

import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2023/7/10 0010
 **/
@Data
@ApiModel(value = "更改密码实体封装")
public class PasswordDto {
    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "请输入正确的手机号格式！")
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;

    @NotNull(message = "更改密码类型不能为空！")
    @ApiModelProperty(value = "改密类型：1-旧密码改密，2-验证码改密", required = true)
    private Integer type;

    @NotBlank(message = "旧密码或验证码不能为空！")
    @ApiModelProperty(value = "旧密码/验证码", required = true)
    private String  oldPassword;

    @NotBlank(message = "新密码不能为空！")
    @ApiModelProperty(value = "新密码", required = true)
    private String newPassword;

}
